package com.leo.vo;

public class NetBugResult {
	//结果
	private Object result;
	private String status;
	
	public NetBugResult (String status, Object result) {
		setResult(result);
		setStatus(status);
	}

	//网络异常
	public static NetBugResult networkError() {
		return new NetBugResult("0", "network error!");
	}
	
	//密码错误
	public static NetBugResult stuIDOrPasswordError() {
		return new NetBugResult("0", "stuID or password error!");
	}
	
	//请求的url错误
	public static NetBugResult urlError() {
		return new NetBugResult("0", "url error!");
	}

	//accessToken过期
	public static NetBugResult accessTokenError() {
		return new NetBugResult("-2", "accessToken error!");
	}
	
	public Object getResult() {
		return result;
	}


	/**
	 * 	执行结果:
	 *	0:账号密码问题
	 *	-1:网络问题
	 *	1:成功
	 *	-2:accessToken过期或无效
	 * @return
	 */
	public String getStatus() {
		return status;
	}
	public void setResult(Object result) {
		this.result = result;
	}
	public void setStatus(String status) {
		this.status = status;
	}
}
